package com.general.framework.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(topic = "my-topic", consumerGroup = "my-consumer_group")
public class MqConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        log.info("接收到topic = ，内容为：{}", s);
    }
}
